/*
 * @ProjectName: flutter_common
 * @Package: 
 * @ClassName: audit_line_provider.dart
 * @Description: 审核页面的输入框下划线局部刷新
 * @User: Page.Su
 * @Date: 2020/9/1
 * @Time: 10:58
 * @UpdateDate: 2020/9/1 10:58
 */

import 'package:flutter/cupertino.dart';
import 'package:flutter_su/common/fun.dart';

class AuditLineProvider with ChangeNotifier {

  // 定义一个List<bool>, 保存下划线的显示隐藏状态
  List<bool> _listInput = List.generate(6, (index) => false);

  // 定义一个List<bool>, 保存图片区域的隐藏显示状态
//  List<bool> _listImage = List.generate(4, (index) => index ==0 ? true : false);
  List<bool> _listImage = List.generate(4, (index) => false);

  List<bool> get listInput => this._listInput;
  List<bool> get listImage => this._listImage;

  void setInputData(int index, bool value) {
    this._listInput[index] = value;
    notifyListeners();
  }

  void setImageData(int index, bool value) {
    this._listImage[index] = value;
    notifyListeners();
  }

  void clean() {
    this._listInput = List.generate(6, (index) => false);
    this._listImage = List.generate(4, (index) => false);
  }
}